home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7156 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.2 KB

  1. Path: news1.h1.usa.pipeline.com!usenet
  2. From: grantp@usa.pipeline.com(Pete)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: [Q] Can I link Assembler procedures with C++ Classes??
  5. Date: 21 Feb 1996 21:13:30 GMT
  6. Organization: Kalevi, Inc.
  7. Message-ID: <4gg1tq$sl6@news1.usa.pipeline.com>
  8. NNTP-Posting-Host: pipe11.h1.usa.pipeline.com
  9. X-PipeUser: grantp
  10. X-PipeHub: usa.pipeline.com
  11. X-PipeGCOS: (Pete)
  12. X-Newsreader: Pipeline USA v3.3.0
  13.  
  14. On Feb 20, 1996 23:50:30 in article <[Q] Can I link Assembler procedures
  15. with C++ Classes??>, 'aschen@ix.netcom.com (Sean Aschen)' wrote: 
  16.  
  17.  
  18. >I've got a nice Sprite class which I would like to speed up.  I know 
  19. >how to link an assembler procedure with plain C, but not with C++.  I 
  20. >want to have a class with member functions in assembler!  Is this 
  21. >possible?  What about accessing data members in the class? 
  22. >Should I just suck it up and use the Inline Assembler (which 
  23. >sucks..)?? 
  24. >I have Turbo C++ 3.0 and TASM 4.0 
  25. The procedure is almost the same.  Just wrap your assembler 
  26. routine declarations with extern "C", add an underscore prefix 
  27. to the names in .asm files, and use the /mx option to retain 
  28. case-sensitivity for your exported functions. 
  29.  
  30. -- 
  31. Pete Grant 
  32. Kalevi, Inc. 
  33. Software Engineering & development
  34.